package gui;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import java.awt.Font;
import java.awt.Color;
import javax.swing.JTextField;
import java.awt.event.ActionListener;

/**
 * 
 * @author chkr1_000 Initiates Nemid
 * 
 */
public class Nemid extends JPanel {
	private JLabel lblnemid;
	private JLabel lblCopyright;
	private JButton btnNemidLogin;
	private JLabel lblThebank;
	private JLabel lblKey;
	private JTextField txtNemid;
	private JLabel lblFailNemID;

	/**
	 * Creates the layout for Nemid
	 */
	public Nemid() {
		setLayout(null);
		setSize(Screen.SIZE);
		setBackground(Screen.COLOR);

		lblnemid = new JLabel(".:NemID:.");
		lblnemid.setForeground(Color.WHITE);
		lblnemid.setFont(new Font("Helvetica", Font.BOLD, 20));
		lblnemid.setBounds(302, 50, 89, 21);
		add(lblnemid);

		lblCopyright = new JLabel("\u00A9 Copyright - All rights reserved");
		lblCopyright.setForeground(Color.WHITE);
		lblCopyright.setFont(new Font("Lucida Grande", Font.PLAIN, 13));
		lblCopyright.setBounds(414, 600, 208, 16);
		add(lblCopyright);

		Icon lock = new ImageIcon(getClass().getResource("54-lock@2x.png"));

		btnNemidLogin = new JButton(" Login", lock);
		btnNemidLogin.setFont(new Font("Lucida Grande", Font.PLAIN, 16));
		btnNemidLogin.setBounds(269, 370, 148, 60);
		add(btnNemidLogin);

		Icon logo = new ImageIcon(getClass().getResource("190-bank.png"));

		lblThebank = new JLabel("TheBank", logo, SwingConstants.LEFT);
		lblThebank.setForeground(Color.WHITE);
		lblThebank.setFont(new Font("Helvetica", Font.BOLD, 16));
		lblThebank.setBounds(30, 25, 99, 22);
		add(lblThebank);

		Icon nemid = new ImageIcon(getClass().getResource("237-key@2x.png"));

		lblKey = new JLabel("", nemid, SwingConstants.LEFT);
		lblKey.setForeground(Color.WHITE);
		lblKey.setBounds(189, 231, 113, 60);
		add(lblKey);

		txtNemid = new JTextField();
		txtNemid.setBounds(302, 257, 89, 28);
		add(txtNemid);
		txtNemid.setColumns(10);

		lblFailNemID = new JLabel("You typed the wrong ID");
		lblFailNemID.setIcon(new ImageIcon(Nemid.class
				.getResource("/gui/Error!.png")));
		lblFailNemID.setForeground(Color.RED);
		lblFailNemID
				.setFont(new Font("SansSerif", Font.BOLD | Font.ITALIC, 16));
		lblFailNemID.setBounds(235, 144, 225, 45);
		lblFailNemID.setVisible(false);
		add(lblFailNemID);

	}

	/**
	 * 
	 * @param ActionListener
	 *            (e)
	 */
	public void addActionListener(ActionListener e) {
		btnNemidLogin.addActionListener(e);

	}

	/**
	 * 
	 * @return lblFailNemID
	 */
	public JLabel getLblFailNemID() {
		return lblFailNemID;
	}

	/**
	 * 
	 * @param lblFailNemID
	 */
	public void setLblFailNemID(JLabel lblFailNemID) {
		this.lblFailNemID = lblFailNemID;
	}

	/**
	 * 
	 * @return lblnemid
	 */
	public JLabel getLblnemid() {
		return lblnemid;
	}

	/**
	 * 
	 * @param lblnemid
	 */
	public void setLblnemid(JLabel lblnemid) {
		this.lblnemid = lblnemid;
	}

	/**
	 * 
	 * @return lblCopyright
	 */
	public JLabel getLblCopyright() {
		return lblCopyright;
	}

	/**
	 * 
	 * @param lblCopyright
	 */
	public void setLblCopyright(JLabel lblCopyright) {
		this.lblCopyright = lblCopyright;
	}

	/**
	 * 
	 * @return btnNemidLogin
	 */
	public JButton getBtnNemidLogin() {
		return btnNemidLogin;
	}

	/**
	 * 
	 * @param btnNemidLogin
	 */
	public void setBtnNemidLogin(JButton btnNemidLogin) {
		this.btnNemidLogin = btnNemidLogin;
	}

	/**
	 * 
	 * @return lblThebank
	 */
	public JLabel getLblThebank() {
		return lblThebank;
	}

	/**
	 * 
	 * @param lblThebank
	 */
	public void setLblThebank(JLabel lblThebank) {
		this.lblThebank = lblThebank;
	}

	/**
	 * 
	 * @return lblKey
	 */
	public JLabel getLblKey() {
		return lblKey;
	}

	/**
	 * 
	 * @param lblKey
	 */
	public void setLblKey(JLabel lblKey) {
		this.lblKey = lblKey;
	}

	/**
	 * 
	 * @return txtNemid
	 */
	public JTextField getTxtNemid() {
		return txtNemid;
	}
}
